package top.zuli.package01.class04;

public class SortDemo2 {
    public static void main(String[] args) {
        int[] arr = {1,11,9,3,7,5};
        for (int i = 0; i < arr.length-1; i++) {
            for (int j = i+1; j < arr.length; j++) {
                if (arr[i] > arr[j]){
                    int t = arr[i];
                    arr[i] = arr[j];
                    arr[j] = t;
                }
            }
        }
        for (int j : arr){
            System.out.print(j+" ");
        }
    }
}
